package som.simon.reactor;

import reactor.core.publisher.FluxSink;

public class UserStatusListener {

    private FluxSink<Object> sink;

    public UserStatusListener(FluxSink<Object> sink) {
        this.sink = sink;
    }

    public void online(String username) {
        System.out.println("用户上线了。 username: " + username);
        this.sink.next(username);
    }

}
